a = 1
while a <=9:
	b = 1
	while b <= 9-a:#输入空格
		print (end=" "*9)#输入空白
		b += 1
	c = a
	while c >= 1:
		print ("{}*{}={:<4}".format(c,a,a*c),end=" ")#输入乘法表
		c -= 1
	a += 1
	print ("")#输出9行

print ("="*80)
i = 9
while i >= 1:
	k = 1
	while k < 10-i:#输入空格
		print (end=" "*9)
		k += 1
	j = i
	while j >= 1:
		print ("{}*{}={:<4}".format(j,i,i*j),end=" ")#输入乘法表
		j -= 1
	i -= 1
	print ("")
